<%@page import="bean.ScoreVo"%>
<%@page import="java.util.ArrayList"%>
<%@page import="bean.ScoreDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list.jsp</title>
<link rel='stylesheet' href='./css/score.css'/>
<script src='./js/score.js'></script>
</head>
<body>

<jsp:useBean id="vo" class="bean.ScoreVo" scope="page"/>
<jsp:setProperty property="*" name="vo"/>
<%
ScoreDTO dto = new ScoreDTO();
dto.setVo(vo);
ArrayList<ScoreVo> al = dto.select();
%>
<form name='hiddenFrm' method='post'>
	<input type='hidden' name='nowPage' value='<%=vo.getNowPage() %>'>
	<input type='hidden' name='find' value='<%=vo.getFind() %>'>
	<input type='hidden' name='rno' value='<%=vo.getRno()%>'>
</form>


<h1>LIST</h1>
<div id='score_list_find'>
	<form name='score_list_frm' method='post'
		  action='index.jsp?inc=./score/list.jsp'>
		<input type='text' name='find' value='<%=vo.getFind()%>'>
		<input type='submit' value='검색'>
	</form>
</div>

<div id='score_list_title'>
	<div class='score_list_rno'>순번</div>
	<div class='score_list_mid'>아이디</div>
	<div class='score_list_grade'>학년</div>
	<div class='score_list_exam'>시험종류</div>
	<div class='score_list_point'>성적</div>
</div>
<%for(int a=0; a<al.size() ;a++){ 
	ScoreVo v = al.get(a);

%>

	<div class='score_list_items'>
		<div class='score_list_rno'><%=v.getRno()%></div>
		<div class='score_list_mid'>
			<a href='#' onclick='goView(<%=dto.getNowPage()%>,<%=v.getRno() %>)'>
				<%=v.getMid() %>
			</a>
		</div>
		<div class='score_list_grade'><%=v.getGrade() %></div>
		<div class='score_list_exam'><%="exam" %></div>
		<div class='score_list_point'><%=v.getPoint() %></div>
	</div>

<%} %>

<div id='list_page'>

<a href='#' onclick='goPage(1)'>맨첨</a>
<a href='#' onclick='goPage(<%=dto.getStartPage()-1%>)'>이전</a>

<%
int i=0;

for(i=dto.getStartPage(); i<=dto.getEndPage(); i++){%>
	<a href='#' onclick='goPage(<%=i%>)'><%=i %></a>
<%}%>

<a href='#' onclick='goPage(<%=i%>)'>다음</a>
<a href='#' onclick='goPage(<%=dto.getTotPage()%>)'>맨끝</a>
</div>


<input type='button' value='성적 입력' id='btnInput'/>

<script>listInit();</script>

</body>
</html>









